<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var date = new Date();
        console.log(date.getFullYear()); //年
        console.log(date.getMonth() + 1); //月
        console.log(date.getDate()); //日
        console.log(date.getDay()); //星期
    </script>
</head>

<body>

</body>

</html>